package com.situ.mall.admin.controller;

import com.situ.mall.common.service.IMemberService;
import com.situ.mall.common.vo.LayuiTableVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/member")
public class MemberController {
    @Autowired
    private IMemberService memberService;
    @GetMapping("/list")
    @ResponseBody
    public LayuiTableVO list(String keyword , @RequestParam Integer page, @RequestParam Integer limit ){
        return memberService.list(keyword,page, limit);
    }
    @GetMapping("/index")
    public String index() {
        return "member";
    }

    @PostMapping("/on")
    @ResponseBody
   public void on(Integer id){
        memberService.on(id);
    }
    @PostMapping("/off")
    @ResponseBody
    public void off(Integer id){
        memberService.off(id);
    }
}
